<MPSImageSizeEncodingState >(3) MetalPerformanceShaders.framework <MPSImageSizeEncodingState >(3)

<MPSImageSizeEncodingState >

#import <MPSNeuralNetworkTypes.h>

Inherits <NSObject>.


NSUInteger sourceWidth
NSUInteger sourceHeight

MPSStates conforming to this protocol contain information about a image size elsewhere in the graph In some graphs a sequence of operations are done, then they are undone ins a series of 'reverse' operations. Examples might be pooling vs pooling gradient / upsampling, or convolution vs. convolution transpose. In such cases, the 'reverse' pass generally is converting from a smaller image to a larger image, and there is insufficient information to do this correctly. Several answers exist and we don't know which is correct.

As an example, consider trying to 'undo' integer division with a multiplication. The expression c = a/b is incomplete because there is also a remainder, which may constitute information lost. If we want to reconstitute a based on c and b, we need to use a = c * b + remainder, not just a = c*b. Similarly, when undoing a downsizing operation, we need the original size to find which answer in the range of a = c*b + [0,b-1] is the right one.

- (NSUInteger MPSImageSizeEncodingState) sourceHeight [read], [nonatomic], [assign]

The height of the source image passed to MPSCNNConvolution encode call.

- (NSUInteger MPSImageSizeEncodingState) sourceWidth [read], [nonatomic], [assign]

The width of the source image passed to MPSCNNConvolution encode call.

Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.

Mon Jul 9 2018 Version MetalPerformanceShaders-119.3